package com.mimose.component.chains.config;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description 配置类
 * @Author ccy
 * @Date 2020/1/15
 */
@Configuration
@EnableConfigurationProperties(ChainExecutorProperties.class)
public class ChainConfig {

    @Bean
    ChainStorage chainStorage(ChainExecutorProperties executorProperties){
        return ChainStorage.builder()
                .chainExecutorProperties(executorProperties)
                .build();
    }
}
